Optimal. Leaf size=89 \[ -\frac{b^2 \log \left (a+b \tan ^2(e+f x)\right )}{2 a^2 f (a-b)}-\frac{(a+b) \log (\tan (e+f x))}{a^2 f}-\frac{\log (\cos (e+f x))}{f (a-b)}-\frac{\cot ^2(e+f x)}{2 a f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.112835, antiderivative size = 89, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {3670, 446, 72} \[ -\frac{b^2 \log \left (a+b \tan ^2(e+f x)\right )}{2 a^2 f (a-b)}-\frac{(a+b) \log (\tan (e+f x))}{a^2 f}-\frac{\log (\cos (e+f x))}{f (a-b)}-\frac{\cot ^2(e+f x)}{2 a f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3670
Rule 446
Rule 72
Rubi steps
\begin{align*} \int \frac{\cot ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1}{x^3 \left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \frac{1}{x^2 (1+x) (a+b x)} \, dx,x,\tan ^2(e+f x)\right )}{2 f}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{1}{a x^2}+\frac{-a-b}{a^2 x}+\frac{1}{(a-b) (1+x)}-\frac{b^3}{a^2 (a-b) (a+b x)}\right ) \, dx,x,\tan ^2(e+f x)\right )}{2 f}\\ &=-\frac{\cot ^2(e+f x)}{2 a f}-\frac{\log (\cos (e+f x))}{(a-b) f}-\frac{(a+b) \log (\tan (e+f x))}{a^2 f}-\frac{b^2 \log \left (a+b \tan ^2(e+f x)\right )}{2 a^2 (a-b) f}\\ \end{align*}
Mathematica [A] time = 0.249807, size = 63, normalized size = 0.71 \[ -\frac{\frac{b^2 \log \left (a \cot ^2(e+f x)+b\right )}{a^2 (a-b)}+\frac{2 \log (\sin (e+f x))}{a-b}+\frac{\cot ^2(e+f x)}{a}}{2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.08, size = 150, normalized size = 1.7 \begin{align*} -{\frac{1}{4\,fa \left ( \cos \left ( fx+e \right ) +1 \right ) }}-{\frac{\ln \left ( \cos \left ( fx+e \right ) +1 \right ) }{2\,fa}}-{\frac{\ln \left ( \cos \left ( fx+e \right ) +1 \right ) b}{2\,f{a}^{2}}}-{\frac{{b}^{2}\ln \left ( a \left ( \cos \left ( fx+e \right ) \right ) ^{2}- \left ( \cos \left ( fx+e \right ) \right ) ^{2}b+b \right ) }{2\,f{a}^{2} \left ( a-b \right ) }}+{\frac{1}{4\,fa \left ( \cos \left ( fx+e \right ) -1 \right ) }}-{\frac{\ln \left ( \cos \left ( fx+e \right ) -1 \right ) }{2\,fa}}-{\frac{\ln \left ( \cos \left ( fx+e \right ) -1 \right ) b}{2\,f{a}^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.11219, size = 92, normalized size = 1.03 \begin{align*} -\frac{\frac{b^{2} \log \left (-{\left (a - b\right )} \sin \left (f x + e\right )^{2} + a\right )}{a^{3} - a^{2} b} + \frac{{\left (a + b\right )} \log \left (\sin \left (f x + e\right )^{2}\right )}{a^{2}} + \frac{1}{a \sin \left (f x + e\right )^{2}}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.22708, size = 297, normalized size = 3.34 \begin{align*} -\frac{b^{2} \log \left (\frac{b \tan \left (f x + e\right )^{2} + a}{\tan \left (f x + e\right )^{2} + 1}\right ) \tan \left (f x + e\right )^{2} +{\left (a^{2} - b^{2}\right )} \log \left (\frac{\tan \left (f x + e\right )^{2}}{\tan \left (f x + e\right )^{2} + 1}\right ) \tan \left (f x + e\right )^{2} +{\left (a^{2} - a b\right )} \tan \left (f x + e\right )^{2} + a^{2} - a b}{2 \,{\left (a^{3} - a^{2} b\right )} f \tan \left (f x + e\right )^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 68.3657, size = 743, normalized size = 8.35 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.4894, size = 551, normalized size = 6.19 \begin{align*} \frac{\frac{8 \,{\left (2 \, a^{5} - 2 \, a^{4} b + a^{3} b^{2} - a^{2} b^{3}\right )} \log \left (24 \,{\left | a \right |}^{3}\right )}{a^{6} - 2 \, a^{5} b + a^{4} b^{2}} - \frac{4 \,{\left (2 \, a^{5} - 2 \, a^{4} b + a^{3} b^{2} - a^{2} b^{3}\right )} \log \left ({\left | -12 \, a^{4} \cos \left (f x + e\right )^{2} + 12 \, a^{3} b \cos \left (f x + e\right )^{2} - 12 \, a^{3} b \right |}\right )}{a^{6} - 2 \, a^{5} b + a^{4} b^{2}} - \frac{12 \,{\left (a + b\right )} \log \left (-\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )}{a^{2}} + \frac{8 \,{\left (a + b\right )} \log \left ({\left | a + \frac{a{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac{4 \, b{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac{a{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac{4 \, b{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac{a{\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} \right |}\right )}{a^{2}} + \frac{3 \,{\left (a + \frac{4 \, a{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac{4 \, b{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1}\right )}{\left (\cos \left (f x + e\right ) + 1\right )}}{a^{2}{\left (\cos \left (f x + e\right ) - 1\right )}} + \frac{3 \,{\left (\cos \left (f x + e\right ) - 1\right )}}{a{\left (\cos \left (f x + e\right ) + 1\right )}}}{24 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]